package com.umakr.demo.service;

import com.umakr.demo.mapper.TeacherKechengMapper;
import com.umakr.demo.model.Kecheng;
import com.umakr.demo.model.TeacherKecheng;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by yangliu on 2017/8/19.
 */
@Service
public class TeacherKechengSerivice {
    @Autowired
    TeacherKechengMapper teacherKechengMapper;

    public List<Kecheng> teacherToKecehng(Long tid){
        return teacherKechengMapper.teacherToKecheng(tid);
    }

    public void deleteAll(Long tid){
        teacherKechengMapper.deleteAll(tid);
    }

    public void addAll(TeacherKecheng teacherKecheng){
        teacherKechengMapper.addAll(teacherKecheng);
    }
}
